package com.webchat.chat.service.impl;

import com.webchat.chat.dao.ClientServiceRecordMapper;
import com.webchat.chat.model.ClientServiceRecord;
import com.webchat.chat.service.ClientServiceRecordService;
import com.webchat.chat.core.AbstractService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by admin on 2018-06-29.
 */
@Service
@Transactional
public class ClientServiceRecordServiceImpl extends AbstractService<ClientServiceRecord> implements ClientServiceRecordService {
    @Resource
    private ClientServiceRecordMapper clientServiceRecordMapper;

    @Override
    public List<ClientServiceRecord> findByCustomerClientId(String customerClientId) {
        return clientServiceRecordMapper.selectByCustomerClientId(customerClientId);
    }

    @Override
    public ClientServiceRecord findLastByCustomerClientId(String customerClientId, String targetClientId) {
        return clientServiceRecordMapper.selectLastByCustomerClientId(customerClientId, targetClientId);
    }
}
